using System; 
using System.Text; 
using System.Data;
using System.Data.SqlClient;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration; 
using System.Xml; 
using System.Xml.Serialization;
using SubSonic; 
using SubSonic.Utilities;
namespace Data
{
    /// <summary>
    /// Controller class for Orders
    /// </summary>
    public partial class articlecategoryController
    {


		
	    /// <summary>
	    /// Inserts a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Insert, true)]
	    public void Insert(
                                        String 
                            ArtCateID
                            , 
                            String 
                            CateName
                            , 
                            String 
                            Description
                            , 
                            String 
                            CateParent
                            , 
                            Int32 
                            VipLevel
                            , 
                            String 
                            Active
                            , 
                            DateTime 
                            CreatedDate
                            , 
                            DateTime 
                            UpdatedDate
            )
	    {		
			articlecategory item = new articlecategory();
			
			item.ArtCateID = ArtCateID;
			item.CateName = CateName;
			item.Description = Description;
			item.CateParent = CateParent;
			item.VipLevel = VipLevel;
			item.Active = bool.Parse(Active);
			item.CreatedDate = CreatedDate;
			item.UpdatedDate = UpdatedDate;
		    item.Save("");
	    }

	    /// <summary>
	    /// Updates a record, can be used with the Object Data Source
	    /// </summary>
        [DataObjectMethod(DataObjectMethodType.Update, true)]
	    public void Update( String  ArtCateID,  String  CateName,  String  Description,  String  CateParent,  Int32  VipLevel,  String  Active,  DateTime  CreatedDate,  DateTime  UpdatedDate)
		{
			articlecategory item = new articlecategory();
			
			item.ArtCateID = ArtCateID;
			item.CateName = CateName;
			item.Description = Description;
			item.CateParent = CateParent;
			item.VipLevel = VipLevel;
			item.Active = bool.Parse(Active);
			item.CreatedDate = CreatedDate;
			item.UpdatedDate = UpdatedDate;
		    item.MarkOld();
		    item.Save("");		
	    }
    }

}
